<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.bstek.dorado.data.db.DBStatement" %>
<%@ page import="com.bstek.dorado.utils.variant.VariantSet" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.bstek.dorado.common.ds.ConnectionHelper" %>
<%@ page import="com.xr.common.CommUtil" %>
<%@ page import="oracle.sql.CLOB" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title> </title>
<META content="text/html; charset=utf-8" http-equiv="content-type" />
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="0">
<style id="styles" type="text/css">

 <%
 String cp=request.getContextPath();
 %>

	</style>
<script type="text/javascript" src="../kindeditor/kindeditor.js"></script>
	 <script type="text/javascript">
	 	KE.show({
			id : 'tipEditor',
			imageUploadJson : '../../../kindeditor/upload_json.jsp',
			fileManagerJson : '../../../kindeditor/file_manager_json.jsp',
			allowFileManager : true
		 
		});
		KE.show({
			id : 'detailEditor',
			imageUploadJson : '../../../kindeditor/upload_json.jsp',
			fileManagerJson : '../../../kindeditor/file_manager_json.jsp',
			allowFileManager : true
		 
		});
	</script>
</head>
<body>

<% 
String ID=request.getParameter("functionId");
String tip="",content="",sysHelpId="";
 Connection connection = null;
String sql="select t.* from PB_SYS_HELP t where t.last_version=1 and t.function_id="+ID;
//System.out.println(sql);
	try {
            connection = ConnectionHelper.getConnection("");
            Statement st = connection.createStatement();
            ResultSet rs = st.executeQuery(sql);
            if(rs.next()){      
          
                tip=CommUtil.BlobToStr((CLOB)rs.getClob("TIP"));
                content=CommUtil.BlobToStr((CLOB)rs.getClob("DETAIL"));
               sysHelpId=rs.getString("SYS_HELP_ID");
                // System.out.println(sysHelpId);
            }
            rs.close();
            st.close();
        }catch(Exception e){}finally {
                try {
                    connection.close();
                } catch (SQLException e) {
                }
        }
      if(tip==null||tip.equals("")){
        tip="";
      }
      if(content==null||content.equals("")){
        content="";
      }
%>
			<%--<textarea  cols="80" id="editor1" name="editor1" rows="30"> 
			 <%=content%>
			 </textarea>
	 --%>
 
	<input type='hidden' id='sysHelpId' value='<%=sysHelpId%>'/>
	<textarea id="tipEditor" name="tipEditor" cols="100" rows="8" style="width:100%;height:250px;visibility:hidden;"><%=htmlspecialchars(tip)%></textarea>
	 
	<hr>
	<textarea id="detailEditor" name="detailEditor" cols="100" rows="8" style="width:100%;height:250px;visibility:hidden;"><%=htmlspecialchars(content)%></textarea>
	  
			
	 
 
	 
	 
</body>
<%!
private String htmlspecialchars(String str) {
	str = str.replaceAll("&", "&amp;");
	str = str.replaceAll("<", "&lt;");
	str = str.replaceAll(">", "&gt;");
	str = str.replaceAll("\"", "&quot;");
	return str;
}
%>
</html>
